﻿@model DrillOnline.Services.DrillScenarios

@{
    ViewBag.Title = "GroupAccounts";
}
@foreach (var item in Model.ActorGroups)
{
    <div style="width:100%;">
        @using (Ajax.BeginForm(new AjaxOptions { HttpMethod="Post", OnFailure="alert('保存失败')",OnSuccess="alert('保存成功');" }))
        {
            <table  class="bg-white" style="width: 100%; padding: 16px;">
                <tr>
                    <td style="padding:8px;">
                        <div class="Flag Flag-Big">@item.Model.Flag</div>
                    </td>
                    <td style="" colspan="2">
                        <h2>@Html.DisplayFor(m => item.GroupKey)</h2>
                    </td>
                </tr>
                <tr>
                    <td style=""></td>
                    <td style="padding:8px;">
                        @Html.Hidden("ID", item.ID)
                        <div>组员密码</div>
                        @Html.TextBox("ActorPwd",(item.Actors == null ||item.Actors.Count==0)?"":item.Actors.First().Password)
                        <div>组员名单--逗号分隔</div>
                        @Html.TextArea("Actors", item.Actors == null ? "" : string.Join(",", item.Actors.Select(v => v.ActorKey).ToArray()))



                    </td>

                    <td style="padding:8px;">
                        <div>评估员密码</div>
                        @Html.TextBox("ExaminerPwd",(item.Examiners == null ||item.Examiners.Count==0)?"":item.Examiners.First().Password)

                        <div>评估员名单--逗号分隔</div>
                        @Html.TextArea("Examiners", item.Examiners == null ? "" : string.Join(",", item.Examiners.Select(v => v.ActorKey).ToArray()))

                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td></td>
                    <td>
                        <div style="float: right">@Helpers.Submit("保存",true)</div>
                    </td>
                </tr>

            </table>

            
        }
    </div>
}
